package com.gushenge.core.models

import com.gushenge.core.beans.Code
import com.gushenge.core.listeners.ResultListener

interface UserModel {
    fun getRegCode(phone: String, type: Int, listener: ResultListener)
    fun selectAddress(listener: ResultListener)
    fun userInfo(listener:ResultListener)
    fun changeUserInfo(value:String,listener:ResultListener)
    fun addAddress(value:String,listener:ResultListener)
    fun deleteAddress(id:String,listener:ResultListener)
    fun login(name:String,password: String,listener: ResultListener)
    fun loginByQqWx(openid: String, type: String,password:String? ,invite:String?, listener: Code<String>.() -> Unit)

    fun bindPhoneCode(phone: String,listener: ResultListener)
    fun bindPhone(phone: String,code:Int,sessionid: String,listener: ResultListener)
    fun changePassword(oldPassword: String,password:String,rePassword: String,listener: ResultListener)
    fun bindEmailCode(email: String, listener: ResultListener)
    fun bindEmail(email: String, code: Int, sessionid: String, listener: ResultListener)
    fun collect(id:String,type:Int, listener:ResultListener)
    fun collectCancel(id:String,type:Int, listener:ResultListener)
    fun myCollect(type:Int,p:Int,listener: ResultListener)
    fun small(listener: ResultListener)
    fun tiedMoney(listener: ResultListener)
    fun bill(type: Int, p: Int, listener: ResultListener)
    fun emailCode(email: String, type: Int, listener: ResultListener)
    fun unBindPhone(phone: String, code: String, sessionid: String, listener: ResultListener)
    fun unBindEmail(email: String, code: String, sessionid: String, listener: ResultListener)
    fun retrievePassword(phone: String?, email: String?, code: String, sessionid: String, password: String, listener: ResultListener)
}